Skip to main content

AuthenticationAPI Methods

An object defining methods for the AuthenticationAPI class.

SetUrl(url)

Sets the API URL for requests.

Parameters:

url (required): string
The new API URL.

Returns:

Type: void
Method does not return anything

Exceptions:

Type: ArgumentNullException
Throws ArgumentNullException if URL is null or empty.

Type: Exception
Throws Exception if the URL is invalid.

This is a sync method. Method runs synchronously.


LoginAsync(loginParameters, cancellationToken, telemetryCollectorHolder)

Authenticates the user using basic authentication parameters.

Parameters:

loginParameters (required): LoginWithBasicAuthenticationParameters
Parameters required for basic authentication.

cancellationToken (optional): CancellationToken
Token to signal cancellation.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task
Task without value

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also


LoginAsync(loginParameters, cancellationToken, telemetryCollectorHolder)

Authenticates the user using access token authentication parameters.

Parameters:

loginParameters (required): LoginWithAccessTokenParameters
Parameters required for access token authentication.

cancellationToken (optional): CancellationToken
Token to signal cancellation.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task
Task without value

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also


LoginAsync(loginParameters, cancellationToken, telemetryCollectorHolder)

Authenticates the user using token authentication parameters.

Parameters:

loginParameters (required): LoginWithTokenAuthenticationParameters
Parameters required for token authentication.

cancellationToken (optional): CancellationToken
Token to signal cancellation.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task
Task without value

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also